package com.syncomponents.context;

import org.perf4j.aop.Profiled;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.syncomponents.context.annotation.Action;
import com.syncomponents.context.annotation.SynComponent;

@SynComponent(value = "helloService", type = "sample")
public class HelloService {

    private Logger logger = LoggerFactory.getLogger(HelloService.class);

    @Action("say.Hello")
    @Profiled(logger = "com.syncomponents.context.HelloService")
    public void sayHello(HelloMessage message) {
        logger.info("Hello! " + message.getName());
    }
}
